package com.company.cloud.product.modules.mgr.models;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class OutModel {

	@ApiModelProperty(value = "流水号")
	private String sn;

	@ApiModelProperty(value = "客户编号")
	private String custNo;

	@ApiModelProperty(value = "客户名称")
	private String custName;

	@ApiModelProperty(value = "订单时间")
	private LocalDateTime orderDate;

	@ApiModelProperty(value = "备注")
	private String memo;

	@ApiModelProperty(value = "出库操作人ID")
	private Integer opUserId;

	@ApiModelProperty(value = "出库操作人用户名")
	private String opUserName;

	@ApiModelProperty(value = "出库单明细")
	private List<OutItemModel> items;

	public void addItem(OutItemModel item) {
		if (this.items == null) {
			this.items = new ArrayList<OutItemModel>();
		}
		if (item != null) {
			this.items.add(item);
		}
	}

}
